Platform Explorer / Nuxeo Platform LTS 2016 8.10

Contribution org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib--providers

This contribution is part of XML component org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib inside nuxeo-elasticsearch-audit-8.10.jar /OSGI-INF/es-audit-pageprovider-contrib.xml

Extension Point

Extension point providers of component PageProviderService.

Contributed Items

  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
          <whereClause docType="BasicAuditSearch">
            <fixedPart>
                {
    		        "bool" : {
    		          "must" : {
    		            "match" : {
    		              "docUUID" : {
    		                "query" : "?",
    		                "type" : "boolean"
    		              }
    		            }
    		          }
    		        }
    			  }          
            </fixedPart>
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>
          </whereClause>
          <sort ascending="true" column="id"/>
          <pageSize>5</pageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
          <whereClause docType="BasicAuditSearch">
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>                
          </whereClause>
          <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
            <property name="coreSession"/>
            <property name="generateUIComments">false</property>
            <whereClause docType="BasicAuditSearch">
              <predicate operator="BETWEEN" parameter="eventDate">
                <field name="startDate" schema="basicauditsearch"/>
                <field name="endDate" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="category">
                <field name="eventCategory" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="IN" parameter="eventId">
                <field name="eventIds" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="principalName">
                <field name="principalName" schema="basicauditsearch"/>
              </predicate>
            </whereClause>
            <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
          </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="LATEST_AUDITED_CREATED_USERS_OR_GROUPS_PROVIDER">
         <pattern>
        {
          "filtered" : {
            "query" : {
              "term" : {
                "category" :  "userGroup"
              }
            },
            "filter" : {
              "or" : [
                {
                  "term" : { "eventId" :  "user_created" }
                },
                {
                  "term" : { "eventId" :  "group_created" }
                }
              ]
            }
          }
        }
        </pattern>
        <sort ascending="false" column="eventDate"/>
        <pageSize>5</pageSize>
        <maxPageSize>100</maxPageSize>
      </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.LatestCreatedUsersOrGroupsPageProvider" name="LATEST_CREATED_USERS_OR_GROUPS_PROVIDER">
      </genericPageProvider>

XML Source

<extension point="providers" target="org.nuxeo.ecm.platform.query.api.PageProviderService">

    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
      <whereClause docType="BasicAuditSearch">
        <fixedPart>
            {
		        "bool" : {
		          "must" : {
		            "match" : {
		              "docUUID" : {
		                "query" : "?",
		                "type" : "boolean"
		              }
		            }
		          }
		        }
			  }          
        </fixedPart>
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>
      </whereClause>
      <sort ascending="true" column="id"/>
      <pageSize>5</pageSize>
    </genericPageProvider>


    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
      <whereClause docType="BasicAuditSearch">
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>                
      </whereClause>
      <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
    </genericPageProvider>

      <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
        <property name="coreSession"/>
        <property name="generateUIComments">false</property>
        <whereClause docType="BasicAuditSearch">
          <predicate operator="BETWEEN" parameter="eventDate">
            <field name="startDate" schema="basicauditsearch"/>
            <field name="endDate" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="category">
            <field name="eventCategory" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="IN" parameter="eventId">
            <field name="eventIds" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="principalName">
            <field name="principalName" schema="basicauditsearch"/>
          </predicate>
        </whereClause>
        <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
      </genericPageProvider>

  <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="LATEST_AUDITED_CREATED_USERS_OR_GROUPS_PROVIDER">
     <pattern>
    {
      "filtered" : {
        "query" : {
          "term" : {
            "category" :  "userGroup"
          }
        },
        "filter" : {
          "or" : [
            {
              "term" : { "eventId" :  "user_created" }
            },
            {
              "term" : { "eventId" :  "group_created" }
            }
          ]
        }
      }
    }
    </pattern>
    <sort ascending="false" column="eventDate"/>
    <pageSize>5</pageSize>
    <maxPageSize>100</maxPageSize>
  </genericPageProvider>

  <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.LatestCreatedUsersOrGroupsPageProvider" name="LATEST_CREATED_USERS_OR_GROUPS_PROVIDER">
  </genericPageProvider>

  </extension>